package com.example.domain.entity;

import com.example.domain.entity.enums.PriceListStatus;
import javax.persistence.*;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.time.LocalDateTime;

/**
 * 价目表实体类
 */
@Data
@EqualsAndHashCode(callSuper = true)
@Entity
@Table(name = "price_lists")
public class PriceList extends SoftDeleteEntity {

    @Id
    @Column(name = "id", length = 26)
    private String id;

    @Column(name = "name", length = 100, nullable = false)
    private String name;

    @Column(name = "effective_from", nullable = false)
    private LocalDateTime effectiveFrom;

    @Column(name = "effective_to")
    private LocalDateTime effectiveTo;

    @Enumerated(EnumType.STRING)
    @Column(name = "status", length = 20, nullable = false)
    private PriceListStatus status = PriceListStatus.ACTIVE;
}

